<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/machine/machine " method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="machine"/>
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel"/>
            <label>设备名称：</label>
            <g:select  name="RESERVED1" from="${package10}" data-toggle="selectpicker" data-width="150"
                       data-live-search="true" optionKey="RESERVED1" optionValue="RESERVED1" value="${RESERVED1}"
                       noSelection="['': '--ALL--']"/>
            <label>开始时间<strong><span class="text-danger">*</span></strong>：</label>
            <input type="text" name="startTime" class="form-control"
                   data-toggle="datepicker" data-pattern="yyyy-MM-dd HH:mm:ss"
                   size="18" id="start-date-input" readonly value="${startTime.format('yyyy-MM-dd ')}">&nbsp;
            <label>结束时间<strong><span class="text-danger">*</span></strong>：</label>
            <input type="text" name="endTime" class="form-control"
                   data-toggle="datepicker" data-pattern="yyyy-MM-dd HH:mm:ss"
                   size="18" id="end-date-input" readonly value="${endTime.format('yyyy-MM-dd ')}">&nbsp;
            <button type="submit" class="btn-default" data-icon="search" id="btn">查询</button>&nbsp;
            <button type="button" class="btn-blue"
                    onclick="javascript:bjuiExportExl('#pagerForm', '${request.getContextPath()}/machine/exportExcel')"
                    data-icon="file-excel-o" title="导出Excel">导出Excel文件</button>&nbsp;
        </div>
    </form>
</div>
<g:if test="${machine.size > 0}">
    <div class="bjui-pageContent">
        <table data-toggle="tablefixed" data-nowrap="true">
            <thead>
            %{-- <tr style="height: 10px;" align="center">

             </tr>--}%
            <tr>
                <h3 class="panel-title" align="center"><i class="fa fa-line-chart fa-fw"></i>
                    机台综合效率
                </h3>
                <th width="80" rowspan="2">设备</th>
                <th width="100" rowspan="2">日期</th>
                <th width="70" rowspan="2">可用时间H</th>
                <th width="60" rowspan="2">停机频次</th>
                <th width="160" colspan="2" align="center">down time</th>
                <th width="90" rowspan="2">运转时间H</th>
                <th width="85" rowspan="2">使用效率%</th>
                <th width="145" rowspan="2">产品名</th>
                <th width="90" rowspan="2">理论产出PCS</th>
                <th width="86" rowspan="2">实际产出PCS</th>
                <th width="80" rowspan="2">执行绩效%</th>
                <th width="90" rowspan="2">良品数PCS</th>
                <th width="70" rowspan="2">良品率%</th>
                <th width="96" rowspan="2">设备运转效率%</th>
                <th width="70" rowspan="2">备注</th>
            </tr>
            <tr>
                <th width="85">停机时间MIN</th>
                <th width="85">停机时间H</th>
            </tr>
            </thead>
            <tbody>
            <g:each in="${machine}" status="i" var="tableInstance" id="a1">
                <tr>
                    <td width="70">${tableInstance.EQUIPMENT_ID}</td>   %{--设备--}%
                    <td width="100" id="mode" name="ageShow11">${tableInstance.ITEM}</td> %{--日期--}%
                    <td width="70">${tableInstance.AVAILABE_TIME}</td> %{--可用时间H--}%
                    <td width="70">${tableInstance.FREQUENCY}</td>  %{--停机频次--}%
                    <td width="70">${tableInstance.STOP_TIME_MIN}</td>  %{--停机时间MIN--}%
                    <td width="70">${tableInstance.STOP_TIME_MIN_H}</td>  %{--停机时间H--}%
                    <td width="70">${tableInstance.OPERATING_TIME}</td>  %{--运转时间H--}%
                    <td width="130">${tableInstance.AVAILAB_LITY}</td>  %{--使用效率--}%
                    <td width="70">${tableInstance.DEVICE_NO}</td>  %{--产品名--}%
                    <td width="70">${tableInstance.IDEAL_OUTPUT}</td>  %{--理论产出PCS--}%
                    <td width="70">${tableInstance.ACTUAL_OUTPUT}</td>  %{--实际产出PCS--}%
                    <td width="70">${tableInstance.PREFORMANCE}</td>  %{--执行绩效--}%

                    <td width="70">${tableInstance.GOOD_QTY}</td>  %{--良品数PCS--}%
                    <td width="70">${tableInstance.GOOD_NUMBER}</td>  %{--良品率--}%
                    <td width="70">${tableInstance.OEE}</td>  %{--设备运转效率--}%
                    <td width="70">${tableInstance.备注}</td>
                </tr>
            </g:each>
            <g:each in="${machineTotal}" status="i" var="tableInstance1">
                <tr>
                    <td width="100">Total</td>
                    <td width="70"></td>
                    <td width="70">${tableInstance1.AVAILABE_TIME1}</td>
                    <td width="70">${tableInstance1.FREQUENCY1}</td>
                    <td width="70">${tableInstance1.STOP_TIME_MIN1}</td>
                    <td width="70">${tableInstance1.STOP_TIME_MIN_H1}</td>
                    <td width="70">${tableInstance1.OPERATING_TIME1}</td>
                    <td width="130">${tableInstance1.AVAILAB_LITY1}</td>
                    <td width="70"></td>

                    <td width="70">${tableInstance1.IDEAL_OUTPUT1}</td>
                    <td width="70">${tableInstance1.ACTUAL_OUTPUT1}</td>
                    <td width="70">${tableInstance1.PREFORMANCE1}</td>

                    <td width="70">${tableInstance1.GOOD_QTY1}</td>
                    <td width="70">${tableInstance1.GOOD_NUMBER1}</td>
                    <td width="70">${tableInstance1.OEE1}</td>
                    <td width="70">${tableInstance1.备注1}</td>
                </tr>
            </g:each>
            </tbody>
        </table>
    </div>
</g:if>
<g:render template="../template/pagination"/>
<script>
    var aaa = $("#mode").text();
    /* var aaa = new Date().format("yyyy-MM-dd");*/
    var t = aaa.substr(0, 10);
    $("td[name='ageShow11']").html(t);
</script>

